package cn.edu.sdjzu.xg23.kcsj01_backend.mapper;

import cn.edu.sdjzu.xg23.kcsj01_backend.entity.Employee;
import cn.edu.sdjzu.xg23.kcsj01_backend.entity.EmployeeAssTextbook;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface EmployeeAssTextbookMapper {

    List<EmployeeAssTextbook> getApplicantsByTextbookId(Long textbookId);
    // 根据专利id查询第一申报人
    Employee getFirstApplicantByTextbookId(Long textbookId);
    boolean insertApplicants(@Param("list") List<EmployeeAssTextbook> list);

    @Delete("DELETE FROM employee_textbook WHERE textbook_id = #{textbookId}")
    int delete(Long id);
}

